﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="utf-8" %>

<table class="table-orderList">
    <thead>
    <td>id</td>
    <td>邮件类型</td>
    <td>发件人</td>
    <td>收件人</td>
    <%--<td>邮件内容</td>--%>
    <td>创建时间</td>
    <td>邮件发送状态</td>
    <td>操作</td>
    </thead>
    <c:forEach var="item" items="${data}" varStatus="list">
        <tr>
            <td>${item.id }</td>
            <td>${item.type }</td>
            <td>${item.from_email }</td>
            <td>${item.to_email }</td>
                <%--<td>${item.edesc }</td>--%>
            <td><fmt:formatDate value="${item.create_time }" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
            <td>
                <c:choose>
                    <c:when test="${item.status==0}">
                        待发送
                    </c:when>
                    <c:when test="${item.status==1}">
                        发送成功
                    </c:when>
                    <c:when test="${item.status==2}">
                        发送失败
                    </c:when>
                </c:choose>
            </td>
            <td>
                <a class="text-primary mr-10" data-tab-title="查看详情"
                   href="${basePath}/t_mng_email_sys/add?id=${item.id}">查看详情</a>
            </td>
        </tr>
    </c:forEach>

</table>

<c:choose>
    <c:when test="${!empty data}">
        ${page}
    </c:when>
    <c:otherwise>
        <div class="relative" style="height: 200px">
            <span>没有符合条件的数据，请尝试其他搜索条件</span>
        </div>
    </c:otherwise>
</c:choose>

